<html>
<head><meta charset="utf-8"><title>json: weird output for impl in function · rustdoc · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/index.html">rustdoc</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/json.3A.20weird.20output.20for.20impl.20in.20function.html">json: weird output for impl in function</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="248251402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/json%3A%20weird%20output%20for%20impl%20in%20function/near/248251402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Urgau <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/json.3A.20weird.20output.20for.20impl.20in.20function.html#248251402">(Aug 03 2021 at 17:19)</a>:</h4>
<p>I tried the rustdoc json output to this function:</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">generics</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">(</span><span class="n">a</span>: <span class="nc">T</span><span class="p">,</span><span class="w"> </span><span class="n">b</span>: <span class="nc">impl</span><span class="w"> </span><span class="nb">Iterator</span><span class="o">&lt;</span><span class="n">Item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kt">bool</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="o">!</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>
</code></pre></div>
<p>and the output was:</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="p">[</span><span class="n">src</span><span class="o">/</span><span class="n">main</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">52</span><span class="p">]</span><span class="w"> </span><span class="n">item</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Item</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">id</span>: <span class="nc">Id</span><span class="p">(</span><span class="w"></span>
<span class="w">        </span><span class="s">"0:28"</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="p">),</span><span class="w"></span>
<span class="w">    </span><span class="n">crate_id</span>: <span class="mi">0</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">name</span>: <span class="nb">Some</span><span class="p">(</span><span class="w"></span>
<span class="w">        </span><span class="s">"generics"</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="p">),</span><span class="w"></span>
<span class="w">    </span><span class="n">span</span>: <span class="nb">Some</span><span class="p">(</span><span class="w"></span>
<span class="w">        </span><span class="n">Span</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="n">filename</span>: <span class="s">"lib.rs"</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="n">begin</span>: <span class="p">(</span><span class="w"></span>
<span class="w">                </span><span class="mi">37</span><span class="p">,</span><span class="w"></span>
<span class="w">                </span><span class="mi">0</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="p">),</span><span class="w"></span>
<span class="w">            </span><span class="n">end</span>: <span class="p">(</span><span class="w"></span>
<span class="w">                </span><span class="mi">37</span><span class="p">,</span><span class="w"></span>
<span class="w">                </span><span class="mi">63</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="p">),</span><span class="w"></span>
<span class="w">        </span><span class="p">},</span><span class="w"></span>
<span class="w">    </span><span class="p">),</span><span class="w"></span>
<span class="w">    </span><span class="n">visibility</span>: <span class="nc">Public</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">docs</span>: <span class="nb">None</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">links</span>: <span class="p">{},</span><span class="w"></span>
<span class="w">    </span><span class="n">attrs</span>: <span class="p">[],</span><span class="w"></span>
<span class="w">    </span><span class="n">deprecation</span>: <span class="nb">None</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">inner</span>: <span class="nc">Function</span><span class="p">(</span><span class="w"></span>
<span class="w">        </span><span class="n">Function</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="n">decl</span>: <span class="nc">FnDecl</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="n">inputs</span>: <span class="p">[</span><span class="w"></span>
<span class="w">                    </span><span class="p">(</span><span class="w"></span>
<span class="w">                        </span><span class="s">"a"</span><span class="p">,</span><span class="w"></span>
<span class="w">                        </span><span class="n">Generic</span><span class="p">(</span><span class="w"></span>
<span class="w">                            </span><span class="s">"T"</span><span class="p">,</span><span class="w"></span>
<span class="w">                        </span><span class="p">),</span><span class="w"></span>
<span class="w">                    </span><span class="p">),</span><span class="w"></span>
<span class="w">                    </span><span class="p">(</span><span class="w"></span>
<span class="w">                        </span><span class="s">"b"</span><span class="p">,</span><span class="w"></span>
<span class="w">                        </span><span class="n">ImplTrait</span><span class="p">(</span><span class="w"></span>
<span class="w">                            </span><span class="p">[</span><span class="w"></span>
<span class="w">                                </span><span class="n">TraitBound</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                                    </span><span class="n">trait_</span>: <span class="nc">ResolvedPath</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                                        </span><span class="n">name</span>: <span class="s">"Iterator"</span><span class="p">,</span><span class="w"></span>
<span class="w">                                        </span><span class="n">id</span>: <span class="nc">Id</span><span class="p">(</span><span class="w"></span>
<span class="w">                                            </span><span class="s">"2:7435"</span><span class="p">,</span><span class="w"></span>
<span class="w">                                        </span><span class="p">),</span><span class="w"></span>
<span class="w">                                        </span><span class="n">args</span>: <span class="nb">Some</span><span class="p">(</span><span class="w"></span>
<span class="w">                                            </span><span class="n">AngleBracketed</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                                                </span><span class="n">args</span>: <span class="p">[],</span><span class="w"></span>
<span class="w">                                                </span><span class="n">bindings</span>: <span class="p">[</span><span class="w"></span>
<span class="w">                                                    </span><span class="n">TypeBinding</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                                                        </span><span class="n">name</span>: <span class="s">"Item"</span><span class="p">,</span><span class="w"></span>
<span class="w">                                                        </span><span class="n">binding</span>: <span class="nc">Equality</span><span class="p">(</span><span class="w"></span>
<span class="w">                                                            </span><span class="n">Primitive</span><span class="p">(</span><span class="w"></span>
<span class="w">                                                                </span><span class="s">"bool"</span><span class="p">,</span><span class="w"></span>
<span class="w">                                                            </span><span class="p">),</span><span class="w"></span>
<span class="w">                                                        </span><span class="p">),</span><span class="w"></span>
<span class="w">                                                    </span><span class="p">},</span><span class="w"></span>
<span class="w">                                                </span><span class="p">],</span><span class="w"></span>
<span class="w">                                            </span><span class="p">},</span><span class="w"></span>
<span class="w">                                        </span><span class="p">),</span><span class="w"></span>
<span class="w">                                        </span><span class="n">param_names</span>: <span class="p">[],</span><span class="w"></span>
<span class="w">                                    </span><span class="p">},</span><span class="w"></span>
<span class="w">                                    </span><span class="n">generic_params</span>: <span class="p">[],</span><span class="w"></span>
<span class="w">                                    </span><span class="n">modifier</span>: <span class="nb">None</span><span class="p">,</span><span class="w"></span>
<span class="w">                                </span><span class="p">},</span><span class="w"></span>
<span class="w">                            </span><span class="p">],</span><span class="w"></span>
<span class="w">                        </span><span class="p">),</span><span class="w"></span>
<span class="w">                    </span><span class="p">),</span><span class="w"></span>
<span class="w">                </span><span class="p">],</span><span class="w"></span>
<span class="w">                </span><span class="n">output</span>: <span class="nb">Some</span><span class="p">(</span><span class="w"></span>
<span class="w">                    </span><span class="n">Never</span><span class="p">,</span><span class="w"></span>
<span class="w">                </span><span class="p">),</span><span class="w"></span>
<span class="w">                </span><span class="n">c_variadic</span>: <span class="nc">false</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="p">},</span><span class="w"></span>
<span class="w">            </span><span class="n">generics</span>: <span class="nc">Generics</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="n">params</span>: <span class="p">[</span><span class="w"></span>
<span class="w">                    </span><span class="n">GenericParamDef</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                        </span><span class="n">name</span>: <span class="s">"T"</span><span class="p">,</span><span class="w"></span>
<span class="w">                        </span><span class="n">kind</span>: <span class="nc">Type</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                            </span><span class="n">bounds</span>: <span class="p">[],</span><span class="w"></span>
<span class="w">                            </span><span class="n">default</span>: <span class="nb">None</span><span class="p">,</span><span class="w"></span>
<span class="w">                        </span><span class="p">},</span><span class="w"></span>
<span class="w">                    </span><span class="p">},</span><span class="w"></span>
<span class="w">                    </span><span class="n">GenericParamDef</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                        </span><span class="n">name</span>: <span class="s">"impl Iterator&lt;Item = bool&gt;"</span><span class="p">,</span><span class="w"></span>
<span class="w">                        </span><span class="n">kind</span>: <span class="nc">Type</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                            </span><span class="n">bounds</span>: <span class="p">[</span><span class="w"></span>
<span class="w">                                </span><span class="n">TraitBound</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                                    </span><span class="n">trait_</span>: <span class="nc">ResolvedPath</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                                        </span><span class="n">name</span>: <span class="s">"Iterator"</span><span class="p">,</span><span class="w"></span>
<span class="w">                                        </span><span class="n">id</span>: <span class="nc">Id</span><span class="p">(</span><span class="w"></span>
<span class="w">                                            </span><span class="s">"2:7435"</span><span class="p">,</span><span class="w"></span>
<span class="w">                                        </span><span class="p">),</span><span class="w"></span>
<span class="w">                                        </span><span class="n">args</span>: <span class="nb">Some</span><span class="p">(</span><span class="w"></span>
<span class="w">                                            </span><span class="n">AngleBracketed</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                                                </span><span class="n">args</span>: <span class="p">[],</span><span class="w"></span>
<span class="w">                                                </span><span class="n">bindings</span>: <span class="p">[</span><span class="w"></span>
<span class="w">                                                    </span><span class="n">TypeBinding</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                                                        </span><span class="n">name</span>: <span class="s">"Item"</span><span class="p">,</span><span class="w"></span>
<span class="w">                                                        </span><span class="n">binding</span>: <span class="nc">Equality</span><span class="p">(</span><span class="w"></span>
<span class="w">                                                            </span><span class="n">Primitive</span><span class="p">(</span><span class="w"></span>
<span class="w">                                                                </span><span class="s">"bool"</span><span class="p">,</span><span class="w"></span>
<span class="w">                                                            </span><span class="p">),</span><span class="w"></span>
<span class="w">                                                        </span><span class="p">),</span><span class="w"></span>
<span class="w">                                                    </span><span class="p">},</span><span class="w"></span>
<span class="w">                                                </span><span class="p">],</span><span class="w"></span>
<span class="w">                                            </span><span class="p">},</span><span class="w"></span>
<span class="w">                                        </span><span class="p">),</span><span class="w"></span>
<span class="w">                                        </span><span class="n">param_names</span>: <span class="p">[],</span><span class="w"></span>
<span class="w">                                    </span><span class="p">},</span><span class="w"></span>
<span class="w">                                    </span><span class="n">generic_params</span>: <span class="p">[],</span><span class="w"></span>
<span class="w">                                    </span><span class="n">modifier</span>: <span class="nb">None</span><span class="p">,</span><span class="w"></span>
<span class="w">                                </span><span class="p">},</span><span class="w"></span>
<span class="w">                            </span><span class="p">],</span><span class="w"></span>
<span class="w">                            </span><span class="n">default</span>: <span class="nb">None</span><span class="p">,</span><span class="w"></span>
<span class="w">                        </span><span class="p">},</span><span class="w"></span>
<span class="w">                    </span><span class="p">},</span><span class="w"></span>
<span class="w">                </span><span class="p">],</span><span class="w"></span>
<span class="w">                </span><span class="n">where_predicates</span>: <span class="p">[],</span><span class="w"></span>
<span class="w">            </span><span class="p">},</span><span class="w"></span>
<span class="w">            </span><span class="n">header</span>: <span class="p">{},</span><span class="w"></span>
<span class="w">            </span><span class="n">abi</span>: <span class="s">"</span><span class="se">\"</span><span class="s">Rust</span><span class="se">\"</span><span class="s">"</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="p">},</span><span class="w"></span>
<span class="w">    </span><span class="p">),</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>
<p>The thing that I find weird is that the <code>impl Iterator&lt;Item = bool&gt;</code> is in both <code>function.inputs</code> <strong>and</strong> <code>function.generics</code>.<br>
Is that expected ? If yes, how do I distinguishes them ?</p>



<a name="248356626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/json%3A%20weird%20output%20for%20impl%20in%20function/near/248356626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Urgau <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/json.3A.20weird.20output.20for.20impl.20in.20function.html#248356626">(Aug 04 2021 at 14:23)</a>:</h4>
<p>I hope it's ok to ping you. If it's not, let me know. cc <span class="user-mention" data-user-id="310818">@Joseph Ryan</span> <span class="user-mention" data-user-id="319144">@CraftSpider</span></p>



<a name="248368981"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/json%3A%20weird%20output%20for%20impl%20in%20function/near/248368981" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/json.3A.20weird.20output.20for.20impl.20in.20function.html#248368981">(Aug 04 2021 at 15:51)</a>:</h4>
<p>Well, that seems normal to me. It's a generic argument after all</p>



<a name="248369818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/json%3A%20weird%20output%20for%20impl%20in%20function/near/248369818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Urgau <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/json.3A.20weird.20output.20for.20impl.20in.20function.html#248369818">(Aug 04 2021 at 15:59)</a>:</h4>
<p>That's what I thought; Would you know a way to differentiate them? In my use case I want to print the function like you would write it.</p>



<a name="248369850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/json%3A%20weird%20output%20for%20impl%20in%20function/near/248369850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joseph Ryan <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/json.3A.20weird.20output.20for.20impl.20in.20function.html#248369850">(Aug 04 2021 at 15:59)</a>:</h4>
<p>Yeah <code>impl Trait</code> is the only time you end up with that duplication I think? since usually <code>inputs</code> will contain args "as written" like <code>a: T</code> and then generics will have the where clause or generic param info about the actual bounds on T. It'd be weird to not include <code>impl Trait</code> in either place so it gets duplicated, i'm not sure what you mean by "distinguishing them" since they should be the same?</p>



<a name="248369886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/json%3A%20weird%20output%20for%20impl%20in%20function/near/248369886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joseph Ryan <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/json.3A.20weird.20output.20for.20impl.20in.20function.html#248369886">(Aug 04 2021 at 15:59)</a>:</h4>
<p>also pinging me is fine, thanks for asking</p>



<a name="248370286"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/json%3A%20weird%20output%20for%20impl%20in%20function/near/248370286" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joseph Ryan <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/json.3A.20weird.20output.20for.20impl.20in.20function.html#248370286">(Aug 04 2021 at 16:02)</a>:</h4>
<p>for the purpose of printing a function signature I think you can just ignore any <code>impl Trait</code>s in <code>generics</code> since they cant show up in the generic params or where clause</p>



<a name="248370553"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/json%3A%20weird%20output%20for%20impl%20in%20function/near/248370553" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joseph Ryan <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/json.3A.20weird.20output.20for.20impl.20in.20function.html#248370553">(Aug 04 2021 at 16:04)</a>:</h4>
<p>it'd go something like <code>[visibility] fn [name]&lt;[generics.params]&gt;([inputs]) -&gt; [output] where [generics.where_predicates]</code> if that makes sense</p>



<a name="248370974"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/json%3A%20weird%20output%20for%20impl%20in%20function/near/248370974" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Urgau <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/json.3A.20weird.20output.20for.20impl.20in.20function.html#248370974">(Aug 04 2021 at 16:08)</a>:</h4>
<p><span class="user-mention silent" data-user-id="310818">Joseph Ryan</span> <a href="#narrow/stream/266220-rustdoc/topic/json.3A.20weird.20output.20for.20impl.20in.20function/near/248369850">said</a>:</p>
<blockquote>
<p>Yeah <code>impl Trait</code> is the only time you end up with that duplication I think? since usually <code>inputs</code> will contain args "as written" like <code>a: T</code> and then generics will have the where clause or generic param info about the actual bounds on T. It'd be weird to not include <code>impl Trait</code> in either place so it gets duplicated, i'm not sure what you mean by "distinguishing them" since they should be the same?</p>
</blockquote>
<p>What I meant was, how do you know which one is "right"?</p>
<p><span class="user-mention silent" data-user-id="310818">Joseph Ryan</span> <a href="#narrow/stream/266220-rustdoc/topic/json.3A.20weird.20output.20for.20impl.20in.20function/near/248370286">said</a>:</p>
<blockquote>
<p>for the purpose of printing a function signature I think you can just ignore any <code>impl Trait</code>s in <code>generics</code> since they cant show up in the generic params or where clause</p>
</blockquote>
<p>So, I'm just gonna ignore every generic param who name's start with <code>impl</code>, right ?</p>
<p><span class="user-mention silent" data-user-id="310818">Joseph Ryan</span> <a href="#narrow/stream/266220-rustdoc/topic/json.3A.20weird.20output.20for.20impl.20in.20function/near/248370553">said</a>:</p>
<blockquote>
<p>it'd go something like <code>[visibility] fn [name]&lt;[generics.params]&gt;([inputs]) -&gt; [output] where [generics.where_predicates]</code> if that makes sense</p>
</blockquote>
<p>Exactly, that's what I had also deduced. Thanks for the confirmation.</p>



<a name="248374421"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/json%3A%20weird%20output%20for%20impl%20in%20function/near/248374421" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Urgau <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/json.3A.20weird.20output.20for.20impl.20in.20function.html#248374421">(Aug 04 2021 at 16:35)</a>:</h4>
<p><span class="user-mention" data-user-id="310818">@Joseph Ryan</span> If you're interested this was the output of the printing for the function above: <code>pub fn generics&lt;T, impl Iterator&lt;Item = bool&gt;: Iterator&lt;Item = bool&gt;&gt;(a: T, b: impl Iterator&lt;Item = bool&gt;) -&gt; !;</code></p>



<a name="248383571"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/json%3A%20weird%20output%20for%20impl%20in%20function/near/248383571" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/json.3A.20weird.20output.20for.20impl.20in.20function.html#248383571">(Aug 04 2021 at 17:47)</a>:</h4>
<p>It seems wrong that <code>generics</code> has the existential type, it should only be in the arguments IMO</p>



<a name="248384961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/json%3A%20weird%20output%20for%20impl%20in%20function/near/248384961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Urgau <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/json.3A.20weird.20output.20for.20impl.20in.20function.html#248384961">(Aug 04 2021 at 17:58)</a>:</h4>
<p>Another thing that's also weird is that in <code>generics</code> the name is directly <code>impl Iterator&lt;Item = bool&gt;</code> in addition to having <code>TraitBound</code> which "re-describes" the structure of the <code>impl</code> bound.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>